

#rule all:
#  input: expand("quants/{sample}/quant.sf")

rule salmon_quant:
    input:
        r1 = "data/LSC-{sample}_1.fastq.gz",
        r2 = "data/LSC-{sample}_2.fastq.gz",
        index = "/home/Bill/Documents/DataAnalysis/ZCMiceBulk/ref/salmon_mouse_index"
    output:
        "quants/{sample}/quant.sf"
    params:
        dir = "quants/{sample}"
    shell: # bash command
        "salmon quant -i {input.index} -l A -p 8 --validateMappings \
         --gcBias -o {params.dir} \
         -1 {input.r1} -2 {input.r2}"

rule tximeta:
    input:
        "quants/G/quant.sf",
        "quants/M/quant.sf"
    output:
        "data/geneSumExp.rds"
    script: # cite external script
        "scripts/tximeta.R"
